﻿using System.Windows.Media;
using Windows.UI;
using BalanceManager.Model;
using System;
using System.Globalization;
using System.Windows.Data;

namespace BalanceManager.Helpers.Converters
{
    public class FlowTypeToColorConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var ff = (FlowType) value; 
            switch (ff)
            {
                case FlowType.Expense: return new SolidColorBrush(Colors.Brown);
                case FlowType.Profit: return new SolidColorBrush(Colors.Cyan);
            }
            return null;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
